﻿using System;
using System.Web.Mvc;

namespace mvcForum.Web.Results {

	public class BannedResult : ActionResult {
		private String description;

		public BannedResult(String description) : base() {
			this.description = description;
		}

		public override void ExecuteResult(ControllerContext context) {
			if (context == null) {
				throw new ArgumentNullException("context");
			}

			context.Controller.TempData.Add("Reason", description);
			context.HttpContext.Response.Redirect("/Forum/NoAccess");
		}
	}
}